from PIL import Image
import os

def convert_jpg_to_bmp(input_folder, output_folder):
    if not os.path.exists(output_folder):
        os.makedirs(output_folder)

    for filename in os.listdir(input_folder):
        if filename.endswith(".jpg"):
            input_path = os.path.join(input_folder, filename)
            output_path = os.path.join(output_folder, filename.replace(".jpg", ".bmp"))

            img = Image.open(input_path)
            img.save(output_path)

if __name__ == "__main__":
    input_folder = "jpg_100"
    output_folder = "bmp_100"

    convert_jpg_to_bmp(input_folder, output_folder)
